All domains (including dom0) should be best effort on creation
authorDario Faggioli <dario.faggioli@citrix.com>
Wed, 4 Jan 2012 16:11:46 +0000 (16:11 +0000)
committerDario Faggioli <dario.faggioli@citrix.com>
Wed, 4 Jan 2012 16:11:46 +0000 (16:11 +0000)
commit4da8a5edbd7800568eb4af5adc118e174e876694
treeaa3a665b16ab6b6ad7f104a81073fe2f5503bfe8
parent7e2b3b4d38f1ff3356f671e0534a105a8ad50741
All domains (including dom0) should be best effort on creation

In the sedf scheduler, while trying to guarantee to dom0 the proper
amount of CPU time for being able to do its job, we end up allocating
75% CPU-share to each and every of its VCPUs. This, combined with the
fact that such a scheduler has no load balancing logic at all (and
thus *all* dom0's VCPUs just rise and stay on physical CPU #0), means
that for example on a 12-cores system we're trying to exploit
75x12=3D900% of what we have on a PCPU, which is definitely too much!

Moreover, even if a cleverer mechanism for distributing VCPUs among
the available PCPUs (if not a proper load balancer) will be put in
place some day, it will still be difficult to decide how much
guaranteed CPU bandwidth each of the dom0's VCPUs should be provided
with, without posing the system at risk of livelock or starvation,
even during boot time.

Therefore, since sedf is capable of some form of best-effort
scheduling, the best thing we can do is ask for this behaviour for
dom0, as it is for all other domains, right upon creation. It will
then be the sysadmin's job to modify dom0's scheduling parameters to
better fit his particular needs, maybe after spreading the load a bit
by pinning VCPUs on PCPUs, or using cpupools, etc.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
xen/common/sched_sedf.c